{template 'common/header-base'}
{if $_W['template'] == 'black'}
	<div class="skin-black" data-skin="black">
	{php $frames = buildframes('store');_calc_current_frames($frames);}
	<div class="head">
		<nav class="navbar navbar-default" role="navigation">
			<div class="container {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
				<div class="navbar-header">
					<a class="navbar-brand" href="{$_W['siteroot']}">
						<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="pull-left" width="110px" height="35px">
					</a>
				</div>
				{if !empty($_W['uid'])}
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav navbar-left">
						{php global $top_nav}
						{loop $top_nav $nav}
						<li{if 'store' == $nav['name']} class="active"{/if}><a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>{$nav['title']}</a></li>
						{/loop}
					</ul>
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown">
							<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i>{$_W['user']['username']} <span class="caret"></span></a>
							<ul class="dropdown-menu color-gray" role="menu">
								<li>
									<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
								</li>
								{if $_W['isfounder']}
								<li class="divider"></li>
								{if uni_user_see_more_info(ACCOUNT_MANAGE_NAME_VICE_FOUNDER, false)}
								<li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
								{/if}
								<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
								<li class="divider"></li>
								{/if}
								<li>
									<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
				{else}
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
						<li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
					</ul>
				</div>
				{/if}
			</div>
		</nav>
	</div>
	<div class="main">
	{if !defined('IN_MESSAGE')}
	<div class="container">
		{if in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
		<div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
		<div class="panel-body clearfix main-panel-body {if !empty($_W['setting']['copyright']['leftmenufixed'])}menu-fixed{/if}">
			<div class="left-menu">
				<div class="left-menu-content">
					<div class="left-menu-top skin-black">
						<div class="font-lg title-setting"><i class="wi wi-setting"></i> 商城</div>
					</div>
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span data-toggle="collapse" data-target="#frame-store_goods" onclick="util.cookie.set('menu_fold_tag:store_goods', util.cookie.get('menu_fold_tag:store_goods') == 1 ? 0 : 1)">商品分类<i class="wi wi-down-sign-s pull-right"></i></span>
						</div>
						<ul class="list-group collapse in" id="frame-platform_module_common">
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('goodsbuyer', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-goods'></i> 应用模块</a>
							</li>
						</ul>
					</div>
					{if $_W['isfounder'] && !user_is_vice_founder()}
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span class="" data-toggle="collapse" data-target="#frame-store_manage" onclick="util.cookie.set('menu_fold_tag:store_manage', util.cookie.get('menu_fold_tag:store_manage') == 1 ? 0 : 1)">商城管理<i class="wi wi-down-sign-s pull-right"></i></span>
						</div>
						<ul class="list-group collapse in" id="frame-platform_module_menu">
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('goodsseller', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-goods-add'></i> 添加商品</a>
							</li>
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('setting', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-store'></i> 商城设置</a>
							</li>
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('paySetting', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-account'></i> 支付设置</a>
							</li>
						</ul>
					</div>
					{/if}
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span class="" data-toggle="collapse" data-target="#frame-store_orders" onclick="util.cookie.set('menu_fold_tag:store_orders', util.cookie.get('menu_fold_tag:store_orders') == 1 ? 0 : 1)">订单管理<i class="wi wi-down-sign-s pull-right"></i></span>
						</div>
						<ul class="list-group collapse in" id="frame-platform_module_menus">
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('orders', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-sale-record'></i> 我的订单</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="right-content">
				<div class="content">
					<!--系统提示-->
					{if $_COOKIE['private_app_notice']}
					<div class="system-tips we7-body-alert">
						<div class="container text-right">
							<span class="alert-info">
								<a href="javascript:;">
									{$_COOKIE['private_app_notice']}
								</a>
								<span class="tips-close" onclick="check_setmeal_hide();" ><i class="wi wi-error-sign"></i></span>
							</span>
						</div>
					</div>
					{php setcookie('private_app_notice', '', -1);}
					{/if}
					<!--end  系统提示-->
					{if empty($_COOKIE['check_setmeal']) && !empty($_W['account']['endtime']) && ($_W['account']['endtime'] - TIMESTAMP < (6*86400))}
					<div class="system-tips we7-body-alert" id="setmeal-tips">
						<div class="container text-right">
							<div class="alert-info">
								<a href="{if $_W['isfounder']}{php echo url('user/edit', array('uid' => $_W['account']['uid']));}{else}javascript:void(0);{/if}">
									您的服务有效期限：{php echo date('Y-m-d', $_W['account']['starttime']);} ~ {php echo date('Y-m-d', $_W['account']['endtime']);}.
									{if $_W['account']['endtime'] < TIMESTAMP}
									目前已到期，请联系管理员续费
									{else}
									将在{php echo floor(($_W['account']['endtime'] - strtotime(date('Y-m-d')))/86400);}天后到期，请及时付费
									{/if}
								</a>
								<span class="tips-close" onclick="check_setmeal_hide();"><i class="wi wi-error-sign"></i></span>
							</div>
						</div>
					</div>
					<script>
						function check_setmeal_hide() {
							util.cookie.set('check_setmeal', 1, 1800);
							$('#setmeal-tips').hide();
							return false;
						}
					</script>
					{/if}
		{/if}
	{/if}
{else}
	<div data-skin="default" class="skin-default {if $_GPC['main-lg']} main-lg-body {/if}">
	{php $frames = buildframes('store');_calc_current_frames($frames);}
	<div class="head">
		<nav class="navbar navbar-default" role="navigation">
			<div class="container {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
				<div class="navbar-header">
					<a class="navbar-brand" href="{$_W['siteroot']}">
						<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="pull-left" width="110px" height="35px">
						<span class="version hidden">{IMS_VERSION}</span>
					</a>
				</div>
				{if !empty($_W['uid'])}
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav navbar-left">
						{php global $top_nav}
						{loop $top_nav $nav}
						<li{if 'store' == $nav['name']} class="active"{/if}><a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>{$nav['title']}</a></li>
						{/loop}
					</ul>
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown">
							<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i>{$_W['user']['username']} <span class="caret"></span></a>
							<ul class="dropdown-menu color-gray" role="menu">
								<li>
									<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
								</li>
								{if $_W['isfounder']}
								<li class="divider"></li>
								{if uni_user_see_more_info(ACCOUNT_MANAGE_NAME_VICE_FOUNDER, false)}
								<li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
								{/if}
								<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
								<li class="divider"></li>
								{/if}
								<li>
									<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
				{else}
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
						<li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
					</ul>
				</div>
				{/if}
			</div>
		</nav>
	</div>
	{if empty($_COOKIE['check_setmeal']) && !empty($_W['account']['endtime']) && ($_W['account']['endtime'] - TIMESTAMP < (6*86400))}
	<div class="system-tips we7-body-alert" id="setmeal-tips">
		<div class="container text-right">
			<div class="alert-info">
				<a href="{if $_W['isfounder']}{php echo url('user/edit', array('uid' => $_W['account']['uid']));}{else}javascript:void(0);{/if}">
					该公众号管理员服务有效期：{php echo date('Y-m-d', $_W['account']['starttime']);} ~ {php echo date('Y-m-d', $_W['account']['endtime']);}.
					{if $_W['account']['endtime'] < TIMESTAMP}
					目前已到期，请联系管理员续费
					{else}
					将在{php echo floor(($_W['account']['endtime'] - strtotime(date('Y-m-d')))/86400);}天后到期，请及时付费
					{/if}
				</a>
				<span class="tips-close" onclick="check_setmeal_hide();"><i class="wi wi-error-sign"></i></span>
			</div>
		</div>
	</div>
	<script>
		function check_setmeal_hide() {
			util.cookie.set('check_setmeal', 1, 1800);
			$('#setmeal-tips').hide();
			return false;
		}
	</script>
	{/if}
	<div class="main">
	{if !defined('IN_MESSAGE')}
	<div class="container">
		<a href="javascript:;" class="js-big-main button-to-big color-gray" title="加宽">{if $_GPC['main-lg']}正常{else}宽屏{/if}</a>
		{if in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site', 'store')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
		<div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
			<div class="content-head panel-heading main-panel-heading">
				<div class="font-lg title-setting"><i class="wi wi-setting"></i> 商城</div>
			</div>
		<div class="panel-body clearfix main-panel-body {if !empty($_W['setting']['copyright']['leftmenufixed'])}menu-fixed{/if}">
			<div class="left-menu">
				<div class="left-menu-content">
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span class="no-collapse">商品分类<i class="wi wi-appsetting pull-right setting"></i></span>
						</div>
						<ul class="list-group collapse in" id="frame-platform_module_common">
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('goodsbuyer', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-goods'></i> 应用模块</a>
							</li>
						</ul>
					</div>
					{if $_W['isfounder'] && !user_is_vice_founder()}
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span class="no-collapse">商城管理<i class="wi wi-appsetting pull-right setting"></i></span>
						</div>
						<ul class="list-group collapse in" id="frame-platform_module_menu">
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('goodsseller', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-goods-add'></i> 添加商品</a>
							</li>
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('setting', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-store'></i> 商城设置</a>
							</li>
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('paySetting', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-account'></i> 支付设置</a>
							</li>
						</ul>
					</div>
					{/if}
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span class="no-collapse">订单管理<i class="wi wi-appsetting pull-right setting"></i></span>
						</div>
						<ul class="list-group collapse in" id="frame-platform_module_menus">
							<li class="list-group-item ">
								<a href="{php echo $this->createWebUrl('orders', array('direct' => 1))}" class="text-over" >
									<i class='wi wi-sale-record'></i> 我的订单</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="right-content">
		{/if}
	{/if}
{/if}